package controllers {
  import com.axon.mvc.patterns.command.AxSimpleCommand;

  import models.vo.Exigencia;

  public class ExigenciaCommand extends AxSimpleCommand {

    //////////////////////////////////////////////////////////////////////////////////////////////////////

    public function execSave(sender:Object, body:Object, extraInfo:Object):void {
      if (Exigencia(body).id)
        AppFacade(facade).exigenciaProxy.update(body as Exigencia);
      else
        AppFacade(facade).exigenciaProxy.create(body as Exigencia);
    }

    //////////////////////////////////////////////////////////////////////////////////////////////////////

    public function execDelete(sender:Object, body:Object, extraInfo:Object):void {
      AppFacade(facade).exigenciaProxy.apagar(body as Exigencia);
    }

  }
}